package com.xbai.goods.feign;

import com.xbai.entity.Result;
import com.xbai.goods.pojo.Category;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author jxbai
 * @desc
 * @date 2021/2/3 0003
 */
@FeignClient("goods")
@RequestMapping("/category")
public interface CategoryFeign {

    /**
     * 根据ID查询Category
     * @param id 主键id
     * @return {@link Result<Category>}
     */
    @GetMapping("/{id}")
    Result<Category> findById(@PathVariable("id") Integer id);
}
